using MicroMsg.Common.Utils;
using MicroMsg.UI.UserContrl;
using MicroMsg.UI.Util;
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Controls;
namespace MicroMsg.UI.Page
{
	public class SeeMemoryPage : BasePage
	{
		public static Action<SeeMemoryPage> onLoaded;
		internal Grid LayoutRoot;
		internal panelTitleControl panel1Line;
		internal Grid ContentPanel;
		internal ScrollViewer scrollViewer1;
		internal TextBlock txtMomoryObjects;
		internal Button button1;
		private bool _contentLoaded;
		public SeeMemoryPage()
		{
			this.InitializeComponent();
			base.add_Loaded(new RoutedEventHandler(this.SeeMemoryPage_Loaded));
		}
		private void SeeMemoryPage_Loaded(object sender, RoutedEventArgs e)
		{
			if (SeeMemoryPage.onLoaded != null)
			{
				SeeMemoryPage.onLoaded.Invoke(this);
				return;
			}
			this.refreshData();
		}
		private void refreshData()
		{
			string text = "";
			object obj = text;
			text = string.Concat(new object[]
			{
				obj,
				"CirclePagePicItem cachecount = ",
				CirclePagePicItem.GetCacheCnt(),
				"\n"
			});
			object obj2 = text;
			text = string.Concat(new object[]
			{
				obj2,
				"TimelineItem cachecount = ",
				TimelineItem.GetCacheCnt(),
				"\n"
			});
			object obj3 = text;
			text = string.Concat(new object[]
			{
				obj3,
				"CirclePagePicsCtrl cachecount = ",
				CirclePagePicsCtrl.GetCacheCnt(),
				"\n"
			});
			object obj4 = text;
			text = string.Concat(new object[]
			{
				obj4,
				"NickNameButton cachecount = ",
				NickNameButton.GetCacheCnt(),
				"\n"
			});
			object obj5 = text;
			text = string.Concat(new object[]
			{
				obj5,
				"UserHeadCtrl cachecount = ",
				UserHeadCtrl.GetCacheCnt(),
				"\n"
			});
			object obj6 = text;
			text = string.Concat(new object[]
			{
				obj6,
				"AppMsgDisplayer cachecount = ",
				AppMsgDisplayer.GetCacheCnt(),
				"\n"
			});
			this.txtMomoryObjects.set_Text(ShowObjectInMemory.ShowAllObjectInMemory() + text);
		}
		public void setContent(string strInfo, string strTitle)
		{
			this.txtMomoryObjects.set_Text(strInfo);
			this.panel1Line.strTitle = strTitle;
		}
		private void button1_Click(object sender, RoutedEventArgs e)
		{
			this.refreshData();
		}
		protected override void OnPageIn(object[] object_0)
		{
		}
		protected override void OnPageOut()
		{
		}
		[DebuggerNonUserCode]
		public void InitializeComponent()
		{
			if (this._contentLoaded)
			{
				return;
			}
			this._contentLoaded = true;
			Application.LoadComponent(this, new Uri("/MicroMsg;component/Source/UI/LogView/SeeMemoryPage.xaml", 2));
			this.LayoutRoot = (Grid)base.FindName("LayoutRoot");
			this.panel1Line = (panelTitleControl)base.FindName("panel1Line");
			this.ContentPanel = (Grid)base.FindName("ContentPanel");
			this.scrollViewer1 = (ScrollViewer)base.FindName("scrollViewer1");
			this.txtMomoryObjects = (TextBlock)base.FindName("txtMomoryObjects");
			this.button1 = (Button)base.FindName("button1");
		}
	}
}
